Improve passing correct duration for THEOads#66
Open
jorisfluyt wants to merge 1 commit intomasterfrom
Open
Conversation
tjtheo
approved these changes
Jul 1, 2025
| // AssetName should never be an empty string | ||
| return mutableMapOf( | ||
| ConvivaSdkConstants.DURATION to if (ad is LinearAd) ad.duration else 0, | ||
| ConvivaSdkConstants.DURATION to if (ad is LinearAd) ad.durationAsDouble else 0.0, |
Contributor
There was a problem hiding this comment.
A little bit more idiomatic perhaps:
Suggested change
| ConvivaSdkConstants.DURATION to if (ad is LinearAd) ad.durationAsDouble else 0.0, | |
| ConvivaSdkConstants.DURATION to (ad as? LinearAd)?.durationAsDouble ?? 0.0, |
Contributor
|
Hmm, should we postpone releasing the Android connectors for 9.7.0 until after we land this PR? 🤔 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We currently pass duration as an integer. This PR improves this to use the Player API to get the duration as a double.
Remark : This player API will become available once 9.7 will be out!